<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动布局练习</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        img {
            vertical-align: middle;
        }

        ul li {
            list-style: none;
        }

        .d {
            width: 960px;
            height: 600px;
            margin: 0 auto;
            text-align: center;
        }

        .d1 {
            height: 80px;
        }

        .d2 {
            height: 30px;
            background-color: blueviolet;
        }

        .d3 {
            height: 410px;

        }

        .d4 {
            height: 60px;
            background-color: aqua;

        }

        .s1 {
            width: 200px;
            height: 80px;
            background-color: green;
        }

        .s2 {
            width: 540px;
            height: 80px;
            background-color: aqua;
        }

        .s3 {
            width: 200px;
            height: 80px;
            background-color: brown;
        }

        .l1 {
            width: 370px;
            height: 410px;

        }

        .l3 {
            width: 200px;
            height: 130px;
            background-color: blueviolet;
        }

        .a1 {
            width: 370px;
            height: 200px;
            background-color: burlywood;
        }

        .a2 {
            width: 180px;
            height: 200px;
            background-color: crimson;
        }

        .l3 ul li {
            width: 200px;
            height: 130px;
            background-color: deeppink;
        }

        .fl {
            float: left;
        }

        .fr {
            float: right;
        }

        .ma-r10 {
            margin-right: 10px;
        }

        .ma-t10 {
            margin-top: 10px;
        }

        .ma-b10 {
            margin-bottom: 10px;
        }
    </style>
</head>

<body>
    <div class="d">
        <div class="d1 ma-b10">
            <div class="s1 fl ma-r10">logo</div>
            <div class="s2 fl">banner1</div>
            <div class="s3 fr">banner2</div>
        </div>
        <div class="d2">菜单</div>
        <div class="d3 ma-t10">
            <div class="l1 fl ma-r10">
                <div class="fl a1 ma-b10">栏目一</div>
                <div class="fl a2">栏目二</div>
                <div class="fr a2">栏目三</div>
            </div>
            <div class="l1 fl">
                <div class="fl a1 ma-b10">栏目四</div>
                <div class="fl a2">栏目五</div>
                <div class="fr a2">栏目六</div>
            </div>
            <div class="l3 fr">
                <ul>
                    <li class="ma-b10">栏目七</li>
                    <li class="ma-b10">栏目八</li>
                    <li class="ma-b10">栏目九</li>
                </ul>
            </div>
        </div>
        <div class="d4 ma-t10">页脚</div>
    </div>
</body>

</html>